#ifndef SWITCH_H
#define SWITCH_H

#include <QWidget>
#include <QTextCodec>

class Switch
{
    Q_OBJECT
public:
    QTextCodec *gbk;
    QTextCodec *utg8;
    Switch();
    //UTF-8 转换 GBK
    QString UtoG(QString utfStr) {
           return gbk->toUnicode(utfStr.toLocal8Bit());
    }
    //GBK 转换 UTF-8
    QString GtoU(QString gbkStr) {
           return utg8->toUnicode(gbkStr.toUtf8());
    }



//signals:

//public slots:

};

#endif // SWITCH_H
